package com.veo.controller;

import com.veo.entity.CommonResult;
import com.veo.entity.Payment;
import com.veo.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class OrderController {

    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping("/consumer/payment/get/{id}")
    CommonResult<Payment> getById(@PathVariable("id")Long id){
        return paymentFeignService.getById(id);
    }

    @GetMapping("/consumer/feign/timeout")
    public String timeout(){
        return paymentFeignService.timeout();
    }
}
